Integrand size = 23, antiderivative size = 116 \[ \int (a+a \cos (c+d x))^3 (A+B \cos (c+d x)) \, dx=\frac {5}{8} a^3 (4 A+3 B) x+\frac {a^3 (4 A+3 B) \sin (c+d x)}{d}+\frac {3 a^3 (4 A+3 B) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {B (a+a \cos (c+d x))^3 \sin (c+d x)}{4 d}-\frac {a^3 (4 A+3 B) \sin ^3(c+d x)}{12 d} \]
5/8*a^3*(4*A+3*B)*x+a^3*(4*A+3*B)*sin(d*x+c)/d+3/8*a^3*(4*A+3*B)*cos(d*x+c )*sin(d*x+c)/d+1/4*B*(a+a*cos(d*x+c))^3*sin(d*x+c)/d-1/12*a^3*(4*A+3*B)*si n(d*x+c)^3/d
Time = 0.39 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.00 \[ \int (a+a \cos (c+d x))^3 (A+B \cos (c+d x)) \, dx=\frac {a^3 \sin (c+d x) \left (30 (4 A+3 B) \arcsin \left (\sqrt {\sin ^2\left (\frac {1}{2} (c+d x)\right )}\right )+\left (88 A+72 B+9 (4 A+5 B) \cos (c+d x)+8 (A+3 B) \cos ^2(c+d x)+6 B \cos ^3(c+d x)\right ) \sqrt {\sin ^2(c+d x)}\right )}{24 d \sqrt {\sin ^2(c+d x)}} \]
(a^3*Sin[c + d*x]*(30*(4*A + 3*B)*ArcSin[Sqrt[Sin[(c + d*x)/2]^2]] + (88*A + 72*B + 9*(4*A + 5*B)*Cos[c + d*x] + 8*(A + 3*B)*Cos[c + d*x]^2 + 6*B*Co s[c + d*x]^3)*Sqrt[Sin[c + d*x]^2]))/(24*d*Sqrt[Sin[c + d*x]^2])
Time = 0.35 (sec) , antiderivative size = 101, normalized size of antiderivative = 0.87, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 3230, 3042, 3124, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a \cos (c+d x)+a)^3 (A+B \cos (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right )^3 \left (A+B \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx\) |
\(\Big \downarrow \) 3230 |
\(\displaystyle \frac {1}{4} (4 A+3 B) \int (\cos (c+d x) a+a)^3dx+\frac {B \sin (c+d x) (a \cos (c+d x)+a)^3}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} (4 A+3 B) \int \left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^3dx+\frac {B \sin (c+d x) (a \cos (c+d x)+a)^3}{4 d}\) |
\(\Big \downarrow \) 3124 |
\(\displaystyle \frac {1}{4} (4 A+3 B) \int \left (\cos ^3(c+d x) a^3+3 \cos ^2(c+d x) a^3+3 \cos (c+d x) a^3+a^3\right )dx+\frac {B \sin (c+d x) (a \cos (c+d x)+a)^3}{4 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{4} (4 A+3 B) \left (-\frac {a^3 \sin ^3(c+d x)}{3 d}+\frac {4 a^3 \sin (c+d x)}{d}+\frac {3 a^3 \sin (c+d x) \cos (c+d x)}{2 d}+\frac {5 a^3 x}{2}\right )+\frac {B \sin (c+d x) (a \cos (c+d x)+a)^3}{4 d}\) |
(B*(a + a*Cos[c + d*x])^3*Sin[c + d*x])/(4*d) + ((4*A + 3*B)*((5*a^3*x)/2 + (4*a^3*Sin[c + d*x])/d + (3*a^3*Cos[c + d*x]*Sin[c + d*x])/(2*d) - (a^3* Sin[c + d*x]^3)/(3*d)))/4
3.1.21.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Int[ExpandTri g[(a + b*sin[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[a^2 - b^2, 0] && IGtQ[n, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/( f*(m + 1))), x] + Simp[(a*d*m + b*c*(m + 1))/(b*(m + 1)) Int[(a + b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && !LtQ[m, -2^(-1)]
Time = 2.52 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.68
method | result | size |
parallelrisch | \(\frac {5 \left (\frac {\left (\frac {3 A}{2}+2 B \right ) \sin \left (2 d x +2 c \right )}{5}+\frac {\left (\frac {A}{3}+B \right ) \sin \left (3 d x +3 c \right )}{10}+\frac {\sin \left (4 d x +4 c \right ) B}{80}+\frac {\left (3 A +\frac {13 B}{5}\right ) \sin \left (d x +c \right )}{2}+d x \left (A +\frac {3 B}{4}\right )\right ) a^{3}}{2 d}\) | \(79\) |
risch | \(\frac {5 a^{3} A x}{2}+\frac {15 a^{3} B x}{8}+\frac {15 a^{3} A \sin \left (d x +c \right )}{4 d}+\frac {13 a^{3} B \sin \left (d x +c \right )}{4 d}+\frac {\sin \left (4 d x +4 c \right ) B \,a^{3}}{32 d}+\frac {\sin \left (3 d x +3 c \right ) A \,a^{3}}{12 d}+\frac {\sin \left (3 d x +3 c \right ) B \,a^{3}}{4 d}+\frac {3 \sin \left (2 d x +2 c \right ) A \,a^{3}}{4 d}+\frac {\sin \left (2 d x +2 c \right ) B \,a^{3}}{d}\) | \(135\) |
parts | \(a^{3} A x +\frac {\left (A \,a^{3}+3 B \,a^{3}\right ) \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3 d}+\frac {\left (3 A \,a^{3}+B \,a^{3}\right ) \sin \left (d x +c \right )}{d}+\frac {\left (3 A \,a^{3}+3 B \,a^{3}\right ) \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {B \,a^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(143\) |
derivativedivides | \(\frac {\frac {A \,a^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+B \,a^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+3 A \,a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+B \,a^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+3 A \,a^{3} \sin \left (d x +c \right )+3 B \,a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+A \,a^{3} \left (d x +c \right )+B \,a^{3} \sin \left (d x +c \right )}{d}\) | \(176\) |
default | \(\frac {\frac {A \,a^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+B \,a^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+3 A \,a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+B \,a^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+3 A \,a^{3} \sin \left (d x +c \right )+3 B \,a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+A \,a^{3} \left (d x +c \right )+B \,a^{3} \sin \left (d x +c \right )}{d}\) | \(176\) |
norman | \(\frac {\frac {5 a^{3} \left (4 A +3 B \right ) x}{8}+\frac {73 a^{3} \left (4 A +3 B \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}+\frac {55 a^{3} \left (4 A +3 B \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}+\frac {5 a^{3} \left (4 A +3 B \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {5 a^{3} \left (4 A +3 B \right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {15 a^{3} \left (4 A +3 B \right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}+\frac {5 a^{3} \left (4 A +3 B \right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {5 a^{3} \left (4 A +3 B \right ) x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}+\frac {a^{3} \left (44 A +49 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}\) | \(229\) |
5/2*(1/5*(3/2*A+2*B)*sin(2*d*x+2*c)+1/10*(1/3*A+B)*sin(3*d*x+3*c)+1/80*sin (4*d*x+4*c)*B+1/2*(3*A+13/5*B)*sin(d*x+c)+d*x*(A+3/4*B))*a^3/d
Time = 0.28 (sec) , antiderivative size = 90, normalized size of antiderivative = 0.78 \[ \int (a+a \cos (c+d x))^3 (A+B \cos (c+d x)) \, dx=\frac {15 \, {\left (4 \, A + 3 \, B\right )} a^{3} d x + {\left (6 \, B a^{3} \cos \left (d x + c\right )^{3} + 8 \, {\left (A + 3 \, B\right )} a^{3} \cos \left (d x + c\right )^{2} + 9 \, {\left (4 \, A + 5 \, B\right )} a^{3} \cos \left (d x + c\right ) + 8 \, {\left (11 \, A + 9 \, B\right )} a^{3}\right )} \sin \left (d x + c\right )}{24 \, d} \]
1/24*(15*(4*A + 3*B)*a^3*d*x + (6*B*a^3*cos(d*x + c)^3 + 8*(A + 3*B)*a^3*c os(d*x + c)^2 + 9*(4*A + 5*B)*a^3*cos(d*x + c) + 8*(11*A + 9*B)*a^3)*sin(d *x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 371 vs. \(2 (107) = 214\).
Time = 0.22 (sec) , antiderivative size = 371, normalized size of antiderivative = 3.20 \[ \int (a+a \cos (c+d x))^3 (A+B \cos (c+d x)) \, dx=\begin {cases} \frac {3 A a^{3} x \sin ^{2}{\left (c + d x \right )}}{2} + \frac {3 A a^{3} x \cos ^{2}{\left (c + d x \right )}}{2} + A a^{3} x + \frac {2 A a^{3} \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {A a^{3} \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} + \frac {3 A a^{3} \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{2 d} + \frac {3 A a^{3} \sin {\left (c + d x \right )}}{d} + \frac {3 B a^{3} x \sin ^{4}{\left (c + d x \right )}}{8} + \frac {3 B a^{3} x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} + \frac {3 B a^{3} x \sin ^{2}{\left (c + d x \right )}}{2} + \frac {3 B a^{3} x \cos ^{4}{\left (c + d x \right )}}{8} + \frac {3 B a^{3} x \cos ^{2}{\left (c + d x \right )}}{2} + \frac {3 B a^{3} \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{8 d} + \frac {2 B a^{3} \sin ^{3}{\left (c + d x \right )}}{d} + \frac {5 B a^{3} \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} + \frac {3 B a^{3} \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} + \frac {3 B a^{3} \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{2 d} + \frac {B a^{3} \sin {\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (A + B \cos {\left (c \right )}\right ) \left (a \cos {\left (c \right )} + a\right )^{3} & \text {otherwise} \end {cases} \]
Piecewise((3*A*a**3*x*sin(c + d*x)**2/2 + 3*A*a**3*x*cos(c + d*x)**2/2 + A *a**3*x + 2*A*a**3*sin(c + d*x)**3/(3*d) + A*a**3*sin(c + d*x)*cos(c + d*x )**2/d + 3*A*a**3*sin(c + d*x)*cos(c + d*x)/(2*d) + 3*A*a**3*sin(c + d*x)/ d + 3*B*a**3*x*sin(c + d*x)**4/8 + 3*B*a**3*x*sin(c + d*x)**2*cos(c + d*x) **2/4 + 3*B*a**3*x*sin(c + d*x)**2/2 + 3*B*a**3*x*cos(c + d*x)**4/8 + 3*B* a**3*x*cos(c + d*x)**2/2 + 3*B*a**3*sin(c + d*x)**3*cos(c + d*x)/(8*d) + 2 *B*a**3*sin(c + d*x)**3/d + 5*B*a**3*sin(c + d*x)*cos(c + d*x)**3/(8*d) + 3*B*a**3*sin(c + d*x)*cos(c + d*x)**2/d + 3*B*a**3*sin(c + d*x)*cos(c + d* x)/(2*d) + B*a**3*sin(c + d*x)/d, Ne(d, 0)), (x*(A + B*cos(c))*(a*cos(c) + a)**3, True))
Time = 0.22 (sec) , antiderivative size = 167, normalized size of antiderivative = 1.44 \[ \int (a+a \cos (c+d x))^3 (A+B \cos (c+d x)) \, dx=-\frac {32 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A a^{3} - 72 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{3} - 96 \, {\left (d x + c\right )} A a^{3} + 96 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B a^{3} - 3 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{3} - 72 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{3} - 288 \, A a^{3} \sin \left (d x + c\right ) - 96 \, B a^{3} \sin \left (d x + c\right )}{96 \, d} \]
-1/96*(32*(sin(d*x + c)^3 - 3*sin(d*x + c))*A*a^3 - 72*(2*d*x + 2*c + sin( 2*d*x + 2*c))*A*a^3 - 96*(d*x + c)*A*a^3 + 96*(sin(d*x + c)^3 - 3*sin(d*x + c))*B*a^3 - 3*(12*d*x + 12*c + sin(4*d*x + 4*c) + 8*sin(2*d*x + 2*c))*B* a^3 - 72*(2*d*x + 2*c + sin(2*d*x + 2*c))*B*a^3 - 288*A*a^3*sin(d*x + c) - 96*B*a^3*sin(d*x + c))/d
Time = 0.32 (sec) , antiderivative size = 112, normalized size of antiderivative = 0.97 \[ \int (a+a \cos (c+d x))^3 (A+B \cos (c+d x)) \, dx=\frac {B a^{3} \sin \left (4 \, d x + 4 \, c\right )}{32 \, d} + \frac {5}{8} \, {\left (4 \, A a^{3} + 3 \, B a^{3}\right )} x + \frac {{\left (A a^{3} + 3 \, B a^{3}\right )} \sin \left (3 \, d x + 3 \, c\right )}{12 \, d} + \frac {{\left (3 \, A a^{3} + 4 \, B a^{3}\right )} \sin \left (2 \, d x + 2 \, c\right )}{4 \, d} + \frac {{\left (15 \, A a^{3} + 13 \, B a^{3}\right )} \sin \left (d x + c\right )}{4 \, d} \]
1/32*B*a^3*sin(4*d*x + 4*c)/d + 5/8*(4*A*a^3 + 3*B*a^3)*x + 1/12*(A*a^3 + 3*B*a^3)*sin(3*d*x + 3*c)/d + 1/4*(3*A*a^3 + 4*B*a^3)*sin(2*d*x + 2*c)/d + 1/4*(15*A*a^3 + 13*B*a^3)*sin(d*x + c)/d
Time = 0.30 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.16 \[ \int (a+a \cos (c+d x))^3 (A+B \cos (c+d x)) \, dx=\frac {5\,A\,a^3\,x}{2}+\frac {15\,B\,a^3\,x}{8}+\frac {15\,A\,a^3\,\sin \left (c+d\,x\right )}{4\,d}+\frac {13\,B\,a^3\,\sin \left (c+d\,x\right )}{4\,d}+\frac {3\,A\,a^3\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {A\,a^3\,\sin \left (3\,c+3\,d\,x\right )}{12\,d}+\frac {B\,a^3\,\sin \left (2\,c+2\,d\,x\right )}{d}+\frac {B\,a^3\,\sin \left (3\,c+3\,d\,x\right )}{4\,d}+\frac {B\,a^3\,\sin \left (4\,c+4\,d\,x\right )}{32\,d} \]